3.87 \(\int \frac{\left (d+e x+f x^2\right ) \left (2-x-2 x^2+x^3\right )}{\left (4-5 x^2+x^4\right )^2} \, dx\)

Optimal. Leaf size=82 \[ \frac{d-2 e+4 f}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f)+\frac{1}{48} \log (2-x) (d+2 e+4 f)+\frac{1}{6} \log (x+1) (d-e+f)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f) \]

[Out]

(d - 2*e + 4*f)/(12*(2 + x)) - ((d + e + f)*Log[1 - x])/18 + ((d + 2*e + 4*f)*Lo
g[2 - x])/48 + ((d - e + f)*Log[1 + x])/6 - ((19*d - 26*e + 28*f)*Log[2 + x])/14
4

_______________________________________________________________________________________

Rubi [A]  time = 0.363242, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056 \[ \frac{d-2 e+4 f}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f)+\frac{1}{48} \log (2-x) (d+2 e+4 f)+\frac{1}{6} \log (x+1) (d-e+f)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f) \]

Antiderivative was successfully verified.

[In]  Int[((d + e*x + f*x^2)*(2 - x - 2*x^2 + x^3))/(4 - 5*x^2 + x^4)^2,x]

[Out]

(d - 2*e + 4*f)/(12*(2 + x)) - ((d + e + f)*Log[1 - x])/18 + ((d + 2*e + 4*f)*Lo
g[2 - x])/48 + ((d - e + f)*Log[1 + x])/6 - ((19*d - 26*e + 28*f)*Log[2 + x])/14
4

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((f*x**2+e*x+d)*(x**3-2*x**2-x+2)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 0.102384, size = 77, normalized size = 0.94 \[ \frac{1}{144} \left (\frac{12 (d-2 e+4 f)}{x+2}+24 \log (-x-1) (d-e+f)-8 \log (1-x) (d+e+f)+3 \log (2-x) (d+2 e+4 f)+\log (x+2) (-19 d+26 e-28 f)\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[((d + e*x + f*x^2)*(2 - x - 2*x^2 + x^3))/(4 - 5*x^2 + x^4)^2,x]

[Out]

((12*(d - 2*e + 4*f))/(2 + x) + 24*(d - e + f)*Log[-1 - x] - 8*(d + e + f)*Log[1
 - x] + 3*(d + 2*e + 4*f)*Log[2 - x] + (-19*d + 26*e - 28*f)*Log[2 + x])/144

_______________________________________________________________________________________

Maple [A]  time = 0.017, size = 110, normalized size = 1.3 \[{\frac{13\,\ln \left ( 2+x \right ) e}{72}}-{\frac{7\,\ln \left ( 2+x \right ) f}{36}}-{\frac{19\,\ln \left ( 2+x \right ) d}{144}}+{\frac{d}{24+12\,x}}-{\frac{e}{12+6\,x}}+{\frac{f}{6+3\,x}}-{\frac{\ln \left ( -1+x \right ) d}{18}}-{\frac{\ln \left ( -1+x \right ) e}{18}}-{\frac{\ln \left ( -1+x \right ) f}{18}}+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}+{\frac{\ln \left ( 1+x \right ) f}{6}}+{\frac{\ln \left ( x-2 \right ) d}{48}}+{\frac{\ln \left ( x-2 \right ) e}{24}}+{\frac{\ln \left ( x-2 \right ) f}{12}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((f*x^2+e*x+d)*(x^3-2*x^2-x+2)/(x^4-5*x^2+4)^2,x)

[Out]

13/72*ln(2+x)*e-7/36*ln(2+x)*f-19/144*ln(2+x)*d+1/12/(2+x)*d-1/6/(2+x)*e+1/3/(2+
x)*f-1/18*ln(-1+x)*d-1/18*ln(-1+x)*e-1/18*ln(-1+x)*f+1/6*ln(1+x)*d-1/6*ln(1+x)*e
+1/6*ln(1+x)*f+1/48*ln(x-2)*d+1/24*ln(x-2)*e+1/12*ln(x-2)*f

_______________________________________________________________________________________

Maxima [A]  time = 0.700742, size = 92, normalized size = 1.12 \[ -\frac{1}{144} \,{\left (19 \, d - 26 \, e + 28 \, f\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e + f\right )} \log \left (x + 1\right ) - \frac{1}{18} \,{\left (d + e + f\right )} \log \left (x - 1\right ) + \frac{1}{48} \,{\left (d + 2 \, e + 4 \, f\right )} \log \left (x - 2\right ) + \frac{d - 2 \, e + 4 \, f}{12 \,{\left (x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="maxima")

[Out]

-1/144*(19*d - 26*e + 28*f)*log(x + 2) + 1/6*(d - e + f)*log(x + 1) - 1/18*(d +
e + f)*log(x - 1) + 1/48*(d + 2*e + 4*f)*log(x - 2) + 1/12*(d - 2*e + 4*f)/(x +
2)

_______________________________________________________________________________________

Fricas [A]  time = 0.357387, size = 157, normalized size = 1.91 \[ -\frac{{\left ({\left (19 \, d - 26 \, e + 28 \, f\right )} x + 38 \, d - 52 \, e + 56 \, f\right )} \log \left (x + 2\right ) - 24 \,{\left ({\left (d - e + f\right )} x + 2 \, d - 2 \, e + 2 \, f\right )} \log \left (x + 1\right ) + 8 \,{\left ({\left (d + e + f\right )} x + 2 \, d + 2 \, e + 2 \, f\right )} \log \left (x - 1\right ) - 3 \,{\left ({\left (d + 2 \, e + 4 \, f\right )} x + 2 \, d + 4 \, e + 8 \, f\right )} \log \left (x - 2\right ) - 12 \, d + 24 \, e - 48 \, f}{144 \,{\left (x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="fricas")

[Out]

-1/144*(((19*d - 26*e + 28*f)*x + 38*d - 52*e + 56*f)*log(x + 2) - 24*((d - e +
f)*x + 2*d - 2*e + 2*f)*log(x + 1) + 8*((d + e + f)*x + 2*d + 2*e + 2*f)*log(x -
 1) - 3*((d + 2*e + 4*f)*x + 2*d + 4*e + 8*f)*log(x - 2) - 12*d + 24*e - 48*f)/(
x + 2)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x**2+e*x+d)*(x**3-2*x**2-x+2)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.28489, size = 104, normalized size = 1.27 \[ -\frac{1}{144} \,{\left (19 \, d + 28 \, f - 26 \, e\right )}{\rm ln}\left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d + f - e\right )}{\rm ln}\left ({\left | x + 1 \right |}\right ) - \frac{1}{18} \,{\left (d + f + e\right )}{\rm ln}\left ({\left | x - 1 \right |}\right ) + \frac{1}{48} \,{\left (d + 4 \, f + 2 \, e\right )}{\rm ln}\left ({\left | x - 2 \right |}\right ) + \frac{d + 4 \, f - 2 \, e}{12 \,{\left (x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="giac")

[Out]

-1/144*(19*d + 28*f - 26*e)*ln(abs(x + 2)) + 1/6*(d + f - e)*ln(abs(x + 1)) - 1/
18*(d + f + e)*ln(abs(x - 1)) + 1/48*(d + 4*f + 2*e)*ln(abs(x - 2)) + 1/12*(d +
4*f - 2*e)/(x + 2)